#include<stdio.h>
int facsum(int n)
{
    int sum = 0;
    for(int i = 1; i < n; i ++)
    {
        if(n % i == 0)
            sum += i;
    }
    return sum;
}
int main()
{
    int m, n, b = 0, a;
    scanf("%d %d", &m, &n);
    for(int i = m; i < n; i ++)
    {
        a = facsum(i);
        if(facsum(a) == i && i < a)
        {
            printf("%d %d\n", i, a);
            b = 1;
        }

    }
    if(b == 0) printf("No answer");
    return 0;
}